import React from 'react'
import {  NavBar } from 'antd-mobile'
import { useNavigate } from 'umi'
import styles from './style.less'
interface Props {
  title: string
}
export default function Navbar(props: Props) {
  const navigate = useNavigate();
  const back = () => {
    navigate(-1)
  }
  return (
    <NavBar className={styles['nav-bar']} onBack={back}>{props.title}</NavBar>
  )
}
